package com.zhongke.cotrun.model.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhongke.cotrun.model.validator.UserValidator;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

import javax.validation.constraints.NotNull;

@ApiModel(value = "用户微信信息表单")
@Data
public class WxUserInfo {
	
	@ApiModelProperty(value = "id主键", example = "123")
	@NotNull(message = "id不能为空", groups = {UserValidator.UpDate.class})
    private Long id; 
    
    @ApiModelProperty(value = "user_info主键", example = "123")    
    private int userId;// 用户id
    
    @ApiModelProperty(value = "用户昵称", example = "123")    
    private String nickname;  //用户昵称
    @ApiModelProperty(value = "会话密钥", example = "123")   
    private String sessionKey;  //小程序登录-会话密钥
    @ApiModelProperty(value = "openId", example = "123")   
    private String openid;//openid
    @ApiModelProperty(value = "头像地址", example = "123")   
    private String headimgurl;//头像地址
    @ApiModelProperty(value = "国", example = "123")   
    private String country;//国
    @ApiModelProperty(value = "省区", example = "123")   
    private String province;//省区
    @ApiModelProperty(value = "城市", example = "123")   
    private String city;//城市
    @ApiModelProperty(value = "语言", example = "zh_CN")   
    private String language;//语言
    @ApiModelProperty(value = "性别", example = "0")   
    private String sex;//性别
    @ApiModelProperty(value = "用户特权信息", example = "如微信沃卡用户为（chinaunicom）")   
    private String privliege;//用户特权信息，json 数组，如微信沃卡用户为（chinaunicom）
    @ApiModelProperty(value = "备注", example = "123")   
    private String remarks;//备注
    
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;
    
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;
    
    @ApiModelProperty(value = "删除标记（0：正常；1：回收站）", example = "0")    
    private String delFlag;
}
